#include"led.h"

void led_init(void){
  P0SEL &=~0x17;
  P0DIR |=0x17;
  
  LED1=1;
  LED2=1;
  LED3=1;
  LED4=1;
}

void led_on(char led){
  switch(led){
  case 0x01: LED1 = 0;
  break;
  case 0x02: LED2 = 0;
  break;
  case 0x04: LED3 = 0;
  break;
  case 0x10: LED4 = 0;
  break;
  default:
    break;
  }
}

void led_off(char led){
  switch(led){
  case 0x01: LED1 = 1;
  break;
  case 0x02: LED2 = 1;
  break;
  case 0x04: LED3 = 1;
  break;
  case 0x10: LED4 = 1;
  break;
  default:
    break;
  }
}